package com.xxdemo;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/")
public class HomepageController {
    @GetMapping()
    @ResponseBody
    public String getHomepage() {
        return "Homepage OK";
    }

    @GetMapping("/index.html")
    @ResponseBody
    public String getIndexHtml() {
        return getHomepage();
    }
}
